<?php
$JO[ "Fashion" ] 		= JO(array(
		"EN"=>"JukeOn™ Fashion",
		"VI"=>"Thời Trang JukeOn™"
	) );
$JO["JO_searchid"] 	 	= JO(array("EN"=>"Search Key",			"VI"=>"Search"	));

/*if(!isset ($_SESSION["JO_account_key"]) || $_SESSION["JO_account_authority"]!="SO"){

	echo "<script>location='http://jukeon.vn/JO/';</script>";
}*/
$searchkeyartist=$JO["JO_searchid"];
$wherequery="";
if(isset ($_REQUEST["searchkey"])){
    $searchkeyartist=$_REQUEST["searchkey"];
    if($searchkeyartist!=$JO["JO_searchid"]){
        $wherequery= "and artist.`name` like '%".$searchkeyartist."%'";
    }
}
$page=1;
if(isset ($_REQUEST["Page"])){$page=$_REQUEST["Page"];}
?>
<script type="text/javascript">
$(document).ready(function() {
    $(".datepicker").datepicker({
        //changeYear:true

    });

    $(".datepicker").mask("99/99/9999", { placeholder: "_" });

});

</script>
<div class="JO_page">

	<h1><?= $JO["Fashion"] ?></h1>
        <h2>&nbsp;</h2>
        <h3>&nbsp;</h3>


</div>
<script type="text/javascript">
    var musics=new Array();
    var n=0;
</script>
<div class="JO_relative" style="width: 960px">
     <div class="JO_left" style="width: 240px;">
        <div class="JO_box_240">
            <h1>Artist</h1>
            <input
            id="txtsearchartist"
            type="text"
            style="width: 212px"
            value="<?= urldecode($searchkeyartist)?>"
            onfocus="searchfocus(this);"
            onblur="searchblur(this);"
            onkeypress="searchKeyPress(event);"/>
         <table style="width: 100%">
             <?
             $querycount="
                            SELECT
                                artist.`name`,
                                artist.`key`
                                
                            FROM
                                artist
                            WHERE     artist.`delete` is null and `name` is not null ".$wherequery."
                            
                            ORDER BY artist.`name`
			 ";
             $recordSetnum = JO_query( $querycount );
             $numpages=$recordSetnum->num_rows;
             if(($numpages%30)!=0) {$numpages=(int)($numpages/30)+1;}
             else                {$numpages=$numpages/30;}
            $query="
            SELECT
                artist.`name`,
                artist.`key`
            FROM
                artist
            WHERE    artist.`delete` is null and `name` is not null ".$wherequery."
            ORDER BY artist.`name`
			Limit ".(($page-1)*30).",30
            ";
             //$query="Select * from `artist` where `delete` is null and `name` is not null ".$wherequery." group by `name` order by `name` Limit ".(($page-1)*30).",30";
             $recordSet = JO_query( $query );
             $showselect=TRUE;
             if($recordSet->num_rows) while ($record = $recordSet -> fetch_array( )){
             ?>
             <tr <? if(isset ($_REQUEST["artistid"]) && $_REQUEST["artistid"]==$record["key"]){echo "style='background-color: #FDF7D9'"; }elseif($showselect && !isset ($_REQUEST["artistid"])){echo "style='background-color: #FDF7D9'";$showselect=false;}else{?>onclick="sendurl2('<?=urlencode($record["key"])?>');"<?}?>
                  style="cursor: pointer">
                 <td <? if(isset ($record["top"])){echo 'class="checktop"'; }?> ><?=$record["name"]?></td>
             </tr>
             <?
             }
             ?>
             <tr ><td style="text-align: center;border-bottom: 0px"><?

                if($numpages>1){
                    if($page>2){
                    ?>
                        <a href="#" onclick="sendurl('1');">◀</a>
                    <?
                    }
                    if($page>1){
                    ?>
                        <a href="#" onclick="sendurl('<?=($page-1)?>');">◁</a>

                    <?
                    }
                    if($page-4>1) echo "...";
                    for($i=$page-4;$i<=($page-1);$i++){
                        if($i>0){
                        ?>
                        <a href="#" onclick="sendurl('<?=$i?>');"><?=$i?></a>
                        <?
                        }
                    }
                    echo  "<b style='color=#ffffff;'>".$page."</b>";
                    for($i=$page+1;$i<=($page+4);$i++){
                        if($i<=$numpages){
                        ?>
                        <a href="#" onclick="sendurl('<?=$i?>');"><?=$i?></a>
                        <?
                        }
                    }
                    if($page+4<$numpages) echo "...";
                    if($page<$numpages){
                    ?>
                        <a href="#" onclick="sendurl('<?=($page+1) ?>');">▷</a>
                    <?
                    }
                    if($page<($numpages-1)){
                    ?>
                        <a href="#" onclick="sendurl('<?=$numpages ?>');">▶</a>

                    <?
                    }

                }
                 ?></td></tr>

         </table>
        </div>
     </div>
    <div class="JO_left">
    <div class="JO_bar_720">
            <?
            if(isset ($_REQUEST["artistid"])){
                $query="Select artist.*,`organization`.`name` as oname from `artist`,`organization` where `organization`.`key`=artist.`organization` and artist.`delete` is null and artist.`name` is not null and artist.`key`='".$_REQUEST["artistid"]."'";
            }else{
                $query="Select artist.*,`organization`.`name` as oname from `artist`,`organization` where `organization`.`key`=artist.`organization` and artist.`delete` is null and artist.`name` is not null  ".$wherequery." order by artist.`name`  Limit ".(($page-1)*30).",1";
            }
                $recordSet = JO_query( $query );
                if($recordSet->num_rows) $record = $recordSet -> fetch_array( );
                $dbirth=new DateTime($record["birth"]);
            ?>

        <h1>Artist<? echo "-".$record["name"];$artistid=$record["name"];?></h1>
<!--        <input
            id="txtsearchartist"
            type="text"
            style="width: 692px"
            value="<?//=$searchkeyartist?>"
            onfocus="searchfocus(this);"
            onblur="searchblur(this);"
            onkeypress="searchKeyPress(event);"/>-->
<!--        <select id="cbxartist" style="width: 100%" onchange="changeartist(this);">
            <?
                //$query="Select * from `artist` where `delete` is null and `name` is not null ".$wherequery." group by `name` order by `name` Limit ".(($page-1)*30).",30";
                //$recordSet = JO_query( $query );
                //if($recordSet->num_rows) while ($record = $recordSet -> fetch_array( )){
            ?>
            <option value="<?//=$record["name"]?>" <? //if($record["name"]==$_REQUEST["artistid"]){ echo 'selected=1/';}?>><?//=$record["name"]?></option>
            <?
                //}
            ?>
        </select>-->













       

        
        
                <?
            //}
            ?>
        <form id="frmartist" name="frmartist" method="post" action="JO_05_execution.php" >
        <input type="hidden" id="artistid" name="artistid"
                   value="<?=(isset($record["key"])?$record["key"]:"")?>"/>
        <input type="hidden" id="JO_query" name="JO_query" value="editartist"/>
        <table style="width: 100%;">
            <tr>
                <th style="width: 100px;">Tên Ca Sĩ</th>
                <td>
                    <input style="width: 204px;" type="text" name="txtname"
                           value="<?=(isset($record["name"])?$record["name"]:"")?>"/>
                </td>
            </tr>
            <tr>
                <th>Tên Thật</th>
                <td>
                    <input style="width: 204px;" type="text" name="txtautonym"
                           value="<?=(isset($record["autonym"])?$record["autonym"]:"")?>"/>
                </td>
            </tr>
            <tr>
                <th>Ngày Sinh</th>
                <td>
                    
                    
                    <input style="width: 204px;" type="text" name="txtbirth" class="datepicker"
                           value="<?=(($record["birth"])!="0000-00-00"?($dbirth->format("m/d/Y")):"")?>"/>
                </td>
            </tr>
            <tr>
                <th>Giới Tính</th>
                <td>
                    <input type="radio" name="jo_sex" id="jo_sex" value="1" <?=(($record["sex"]=="1")?"checked=1":"")?>>
                    <img src="JO_80_image/user_gray.png" />
                    <input type="radio" name="jo_sex" id="jo_sex" value="0" <?=(($record["sex"]=="0")?"checked=1":"")?>>
                    <img src="JO_80_image/user_female.png" />
                    <input type="hidden"
                           value="<?=(isset($record["sex"])?$record["sex"]:"")?>"/>
                
                </td>
            </tr>
            <tr>
                <th>Quốc Gia</th>
                <td>
                    <select name="cbxnation" style="width: 218px;" class="icon-menu">
                        <option value="KR" <?=((strtoupper($record["nation"])=="KR")?"selected=1":"")?>>KR</option>
                        
                        <option value="VN" <?=((strtoupper($record["nation"])=="VN")?"selected=1":"")?>
                                style="background: url(JO_80_image/JO_41_icon_nation/ad.png) no-repeat;padding-left: 30px"
                                >VN</option>
                        <option value="TJ" <?=((strtoupper($record["nation"])=="TJ")?"selected=1":"")?>>TJ</option>
                        <option value="TK" <?=((strtoupper($record["nation"])=="TK")?"selected=1":"")?>>TK</option>
                        <option value="TL" <?=((strtoupper($record["nation"])=="TL")?"selected=1":"")?>>TL</option>
                        <option value="TM" <?=((strtoupper($record["nation"])=="TM")?"selected=1":"")?>>TM</option>
                        <option value="TN" <?=((strtoupper($record["nation"])=="TN")?"selected=1":"")?>>TN</option>
                        <option value="TO" <?=((strtoupper($record["nation"])=="TO")?"selected=1":"")?>>TO</option>
                        <option value="TR" <?=((strtoupper($record["nation"])=="TR")?"selected=1":"")?>>TR</option>
                        <option value="TT" <?=((strtoupper($record["nation"])=="TT")?"selected=1":"")?>>TT</option>
                        <option value="TV" <?=((strtoupper($record["nation"])=="TV")?"selected=1":"")?>>TV</option>
                        <option value="TW" <?=((strtoupper($record["nation"])=="TW")?"selected=1":"")?>>TW</option>
                        <option value="TZ" <?=((strtoupper($record["nation"])=="TZ")?"selected=1":"")?>>TZ</option>
                        <option value="UA" <?=((strtoupper($record["nation"])=="UA")?"selected=1":"")?>>UA</option>
                        <option value="UG" <?=((strtoupper($record["nation"])=="UG")?"selected=1":"")?>>UG</option>
                        <option value="US" <?=((strtoupper($record["nation"])=="US")?"selected=1":"")?>>US</option>
                        <option value="UM" <?=((strtoupper($record["nation"])=="UM")?"selected=1":"")?>>UM</option>
                        <option value="UY" <?=((strtoupper($record["nation"])=="UY")?"selected=1":"")?>>UY</option>
                        <option value="UZ" <?=((strtoupper($record["nation"])=="UZ")?"selected=1":"")?>>UZ</option>
                        <option value="VA" <?=((strtoupper($record["nation"])=="VA")?"selected=1":"")?>>VA</option>
                        <option value="VC" <?=((strtoupper($record["nation"])=="VC")?"selected=1":"")?>>VC</option>
                        <option value="VE" <?=((strtoupper($record["nation"])=="VE")?"selected=1":"")?>>VE</option>
                        <option value="VG" <?=((strtoupper($record["nation"])=="VG")?"selected=1":"")?>>VG</option>
                        <option value="VI" <?=((strtoupper($record["nation"])=="VI")?"selected=1":"")?>>VI</option>
                        <option value="VU" <?=((strtoupper($record["nation"])=="VU")?"selected=1":"")?>>VU</option>
                        <option value="WALES" <?=((strtoupper($record["nation"])=="WALES")?"selected=1":"")?>>WALES</option>
                        <option value="WF" <?=((strtoupper($record["nation"])=="WF")?"selected=1":"")?>>WF</option>
                        <option value="WS" <?=((strtoupper($record["nation"])=="WS")?"selected=1":"")?>>WS</option>
                        <option value="YE" <?=((strtoupper($record["nation"])=="YE")?"selected=1":"")?>>YE</option>
                        <option value="YT" <?=((strtoupper($record["nation"])=="YT")?"selected=1":"")?>>YT</option>
                        <option value="ZA" <?=((strtoupper($record["nation"])=="ZA")?"selected=1":"")?>>ZA</option>
                        <option value="ZM" <?=((strtoupper($record["nation"])=="ZM")?"selected=1":"")?>>ZM</option>
                        <option value="ZW" <?=((strtoupper($record["nation"])=="ZW")?"selected=1":"")?>>ZW</option>
                    </select>
            
                </td>
            </tr>
            <tr>
                <th>Công Ty</th>
                <td>
                    <select name="cbxorganization" style="width: 218px;">
                        <?
                        $querynation="Select * from organization where `delete` is null ";
                        $recordSetnation = JO_query( $querynation );
                        if($recordSetnation->num_rows) while($recordnation = $recordSetnation -> fetch_array( )){
                            ?>
                        <option value="<?=$recordnation["key"]?>" <?=(($recordnation["key"]==$record["organization"])?"selected=1":"")?>><?=$recordnation["name"]?></option>
                            <?

                        }

                        ?>

                    </select>
                </td>
            </tr>
            <tr>
                <th>Mô Tả</th>
                <td>
                    <textarea name="txtcontent" style="width: 200px;"><?=(isset($record["content"])?$record["content"]:"")?></textarea>
                </td>
            </tr>
            <tr class="nohover">
                <th></th>
                <td>
                    <input type="submit" class="JO_button" value="Update" style="width: 218px;"/>
                </td>
            </tr>
        </table>
        </form>
        <form
            id="frmupload" name="frmupload" method="post" action="JO_05_execution.php" enctype='multipart/form-data'>
            <input type="hidden" id="artistid" name="artistid"
                   value="<?=(isset($record["key"])?$record["key"]:"")?>"/>
            <input type="hidden" id="JO_query" name="JO_query" value="uploadimg"/>
            <input type="hidden" name="MAX_FILE_SIZE" id="MAX_FILE_SIZE" value="1000000">
        <table style="width: 100%;">
            <tr>
                <th>Hình Ảnh</th>
                <th>Đường Dẫn</th>
                <th>#</th>
            </tr>
            <?
            if(isset ($_REQUEST["artistid"])){
                $queryimg="Select * from artistimg where `delete` is null and  `artist`='".$_REQUEST["artistid"]."'";
            }else{
                $queryimg="Select artistimg.* from artistimg where artistimg.`delete` is null and artist=(Select artist.`key`from `artist` where artist.`delete` is null and artist.`name` is not null  ".$wherequery." order by artist.`name`  Limit ".(($page-1)*30).",1)";
            }
                $recordSetimg = JO_query( $queryimg );
                if($recordSetimg->num_rows) while($recordimg = $recordSetimg -> fetch_array( )){
                    ?>
                    <tr>
                        <td><img src="<?=(isset($recordimg["image"])?$recordimg["image"]:"")?>" height="45px"/></td>
                        <td style="vertical-align: middle;"><?=(isset($recordimg["image"])?$recordimg["image"]:"")?></td>
                        <td style="vertical-align: middle;"><a href="#" onclick="deleteimg('<?=(isset($recordimg["key"])?$recordimg["key"]:"")?>');" title="Delete">Delete</a> </td>
                    </tr>
                    <?

                }
            
            ?>
            <tr>
                <td style="vertical-align: middle;"><input id="chkupload" name="chkupload" type="checkbox" onclick="changeupload(this);" style="margin-right: 8px;"/><span style="padding-top: 4px;">Upload</span></td>
                <td >
                    <span id="spimg"><input type="text" id="txtimgupload" name="txtimgupload" style="width: 300px;"/></span>
                </td>
                <td>
                    <input type="submit" class="JO_button" value="Add"/>
                    
                </td>
            </tr>
           
        </table>
        </form>
    </div>
    </div>
 <script type="text/javascript">
     function deleteimg(id){
         location = "JO_05_execution.php?JO_query=deleteimg&imgid="+id;
     }
     function changeupload(c){
         
         if(c.checked){
             var ct="<input type=\"file\" name=\"myfiles\" style=\"width: 300px;\"/>";
//             ct+="<input type=\"file\" name=\"myfiles[]\" style=\"width: 300px;\"/>";
//             ct+="<input type=\"file\" name=\"myfiles[]\" style=\"width: 300px;\"/>";
//             ct+="<input type=\"file\" name=\"myfiles[]\" style=\"width: 300px;\"/>";
//             ct+="<input type=\"file\" name=\"myfiles[]\" style=\"width: 300px;\"/>";
             document.getElementById("spimg").innerHTML=ct;
         }else{
             document.getElementById("spimg").innerHTML="<input type=\"text\" id=\"txtimgupload\" name=\"txtimgupload\" style=\"width: 300px;\"/>";
         }
     }
    function addtop(id){

        var contenttop="<span id='trtop_"+id+"'>";
        contenttop+="<table  style='width: 100%;margin: 0px 4px 0px 0px;'>";
        contenttop+="<tr >";
        contenttop+="<td style='width: 50px' id='tdtopid_"+id+"'>"+id+"</td>";
        contenttop+="<td id='tdtop_"+id+"'>"+document.getElementById("td_"+id).innerHTML+"</td>";
        contenttop+="<td style='width: 12px'><a href='#i' onclick='topup("+id+");'><img src='JO_80_image/JO_27_icon_up_on.png' class='JO_icon' alt='Up' title='Up'/></a></td>";
        contenttop+="<td style='width: 12px'><a href='#i' onclick='topdown("+id+");'><img src='JO_80_image/JO_28_icon_down_on.png' class='JO_icon' alt='Down' title='Down'/></a></td>";
        contenttop+="<td style='width: 12px'><a href='#i' onclick='removetop("+id+");'><img src='JO_80_image/JO_23_icon_delete_on.png' class='JO_icon' alt='Remove' title='Remove'/></a></td>";
        contenttop+="</tr>";
        contenttop+="</table>";
        contenttop+="</span>";
        document.getElementById("tb_top_music").innerHTML+=contenttop;

        //alert(document.getElementById("tb_top_music").innerHTML);
        var del = document.getElementById("tr_"+id);
        del.parentNode.removeChild(del);
        musics[n]=id;
        n++;
        //document.getElementById("kqkq").innerHTML=musics;
        create_top();
    }
    function removetop(id){

        var contentmusic="<span id='tr_"+id+"'>";
        contentmusic+="<table style='width: 100%;margin: 0px 4px 0px 0px;' >";
        contentmusic+="<tr ><td id='td_"+id+"'>"+document.getElementById("tdtop_"+id).innerHTML+"</td>";
        contentmusic+="<td style='width:12px'><a href='#i' onclick='addtop("+id+");'><img src='JO_80_image/add_top.png' class='JO_icon' alt='Add To Top Music' title='Add To Top Music'/></a></td>";
        contentmusic+="</tr>";
        contentmusic+="</table>";
        contentmusic+="</span>";
        document.getElementById("tb_music").innerHTML+=contentmusic;
        var del=document.getElementById("trtop_"+id);
        del.parentNode.removeChild(del);
        for(var i=0;i<musics.length;i++){
            if(musics[i]==id){
                musics[i]=undefined;
                create_top();
                break;
            }
        }

    }
    function topup(id){

        //alert(document.getElementById("trtop_"+id).id+":id");
        for(var i=0;i<musics.length;i++){
            if(musics[i]==id && i>0){
                var j=1;
                while(musics[i-j]==undefined && i-j>=0){

                    j++;
                }

                var contenttmp=document.getElementById("trtop_"+musics[i]).innerHTML;
//                var contenttmp2=document.getElementById("trtop_"+musics[i-j]);
//                var pct=contenttmp.parentNode;
//                pct.replaceChild(contenttmp,contenttmp2);
//                pct.replaceChild(contenttmp2,contenttmp);
                document.getElementById("trtop_"+musics[i]).innerHTML=document.getElementById("trtop_"+musics[i-j]).innerHTML;;
                document.getElementById("trtop_"+musics[i-j]).innerHTML=contenttmp;

                var idtmptr=document.getElementById("trtop_"+musics[i]).id;
                var idtmptr2=document.getElementById("trtop_"+musics[i-j]).id;
                document.getElementById("trtop_"+musics[i]).id=document.getElementById("trtop_"+musics[i]).id+"abc123";
                document.getElementById("trtop_"+musics[i-j]).id=idtmptr;
                document.getElementById("trtop_"+musics[i]+"abc123").id=idtmptr2

                //hoan vi 2 element
                var tmp=musics[i];
                musics[i]=musics[i-j];
                musics[i-j]=tmp;

                //document.getElementById("kqkq").innerHTML=musics;
                create_top();
                //alert(musics);
                break;
            }
        }

    }
    function topdown(id){
        //alert(document.getElementById("trtop_"+id).id+":id");
        for(var i=0;i<musics.length;i++){
            if(musics[i]==id){
                var j=1;
                while(musics[i+j]==undefined && i+j<musics.length){

                    j++;
                }
                if(musics[i+j]==undefined){ return;}
                //alert(musics[i]+":"+musics[i+j]);



                var contenttmpdown=document.getElementById("trtop_"+musics[i]).innerHTML;
                document.getElementById("trtop_"+musics[i]).innerHTML=document.getElementById("trtop_"+musics[i+j]).innerHTML;
                document.getElementById("trtop_"+musics[i+j]).innerHTML=contenttmpdown;
                //alert(document.getElementById("trtop_"+musics[i+j]).id);

                var idtmptr=document.getElementById("trtop_"+musics[i]).id;
                var idtmptr2=document.getElementById("trtop_"+musics[i+j]).id;
                document.getElementById("trtop_"+musics[i]).id=document.getElementById("trtop_"+musics[i]).id+"abc123";
                document.getElementById("trtop_"+musics[i+j]).id=idtmptr;
                document.getElementById("trtop_"+musics[i]+"abc123").id=idtmptr2;

                //hoan vi 2 element
                var tmp=musics[i];
                musics[i]=musics[i+j];
                musics[i+j]=tmp;

                //document.getElementById("kqkq").innerHTML=musics;
                create_top();
                //alert(musics);
                break;
            }
        }

    }
    function save(){

        var top=";";
        for(var i=0;i<musics.length;i++){
            if(musics[i]!=undefined){
                top+=musics[i]+";";
            }
        }
        //if(top==";"){return;}
		//alert(top);
        //
		//document.getElementById( "JO_integration_asynchronous" ).src = "JO_05_execution.php?JO_query=SaveTopArtist&top="+top+"&artist=<?=$artistid?>";
		location = "JO_05_execution.php?JO_query=SaveTopArtist&top="+top+"&artist=<?=$artistid?>";
    }
    function create_top()
    {
        var ntop=1;
        for(var i=0;i<musics.length;i++){
            if(musics[i]!=undefined){
                document.getElementById("tdtopid_"+musics[i]).innerHTML=ntop;
                ntop++;
            }
        }
    }
    function changeartist(c){
        location="JO_00_integration.php?JO_unit=31_Artist&artistid="+c.value+"&searchkey=<?=urlencode($searchkeyartist)?>";
    }
    function searchfocus(v){
        if(v.value=="<?=$JO["JO_searchid"]?>")
            v.value="";
    }
    function searchblur(v){
        var s=v.value;
        //Cắt bỏ những khoảng trắng đầu chuỗi
        while(s.charCodeAt(0)==32)
            s=s.substring(1);
        //Cắt bỏ những khoảng trắng cuối chuỗi
        while(s.charCodeAt(s.length-1)==32)
            s=s.substring(0,s.length-1);
        if(s=="")
            v.value="<?=$JO["JO_searchid"]?>";
        else
            v.value=s;
    }
    window.onload = function() {
        document.getElementById("txtsearchartist").focus();
    }
    function searchKeyPress(e)
    {
        // look for window.event in case event isn't passed in
        if (window.event) { e = window.event; }
        if (e.keyCode == 13)
        {
            key=document.getElementById("txtsearchartist").value;
            if(key=="<?=$JO["JO_searchid"]?>" || key==""){

                location=("JO_00_integration.php?JO_unit=31_Artist");
            }else{

                location=("JO_00_integration.php?JO_unit=31_Artist&searchkey="+document.getElementById("txtsearchartist").value);
            }

        }
    }
    function sendurl(p){
            <?
            if($searchkeyartist==$JO["JO_searchid"]){
              ?>
                location=("JO_00_integration.php?JO_unit=31_Artist&Page="+p);
                <?
            }else{
                ?>
                location=("JO_00_integration.php?JO_unit=31_Artist&Page="+p+"&searchkey=<?=urlencode($searchkeyartist)?>");
                <?
            }
            ?>

    }
    function sendurl2(p){
            <?
            if($searchkeyartist==$JO["JO_searchid"]){
              ?>
                location=("JO_00_integration.php?JO_unit=31_Artist&Page=<?=$page?>&artistid="+p);
                <?
            }else{
                ?>
                        location=("JO_00_integration.php?JO_unit=31_Artist&Page=<?=$page?>&artistid="+p+"&searchkey=<?=  urlencode($searchkeyartist)?>");
                <?
            }
            ?>

    }
 </script>
</div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          